<#include "constant.ftl">
<!DOCTYPE html>
<html xmlns:v="urn:schemeas-microsoft-com:vml">
<head>
<!--[if lt IE 9]>
<?import namespace="v" implementation="#default#VML" ?>
<![endif]-->
<title>新建资源目录</title>
<!-- bootstrap -->
<#include "commonRef.ftl">
<link rel="stylesheet" type="text/css"	href="${rc.getContextPath()}/resources/js/ztree/css/zTreeStyle/zTreeStyle.css"	>
<script type="text/javascript" src="${rc.getContextPath()}/resources/js/ztree/js/jquery.ztree.core-3.5.js"></script>
<script type="text/javascript" src="${rc.getContextPath()}/resources/js/ztree/js/jquery.ztree.excheck-3.5.js"></script>
<script type="text/javascript" src="${rc.getContextPath()}/resources/js/ztree/js/jquery.ztree.exedit-3.5.js"></script>
<#assign fullShow=operateCode!='create'&&(RequestParameters["status"]!='0'||(RequestParameters["taskId"]??&&RequestParameters["taskId"]>0 ))>
<link rel="stylesheet" type="text/css" href="${rc.getContextPath()}/resources/js/GooFlow-0.8/GooFlow2.css"/>

<link href="${rc.getContextPath()}/resources/js/bootstrap-toggle/css/bootstrap-toggle.min.css" rel="stylesheet">
<script type="text/javascript" src="${rc.getContextPath()}/resources/js/bootstrap-toggle/js/bootstrap-toggle.min.js"></script>


<style type="text/css">
.GooFlow .item_mark td {
    cursor: default;
}
.GooFlow .ico {
    cursor: default;
}
</style>
</head>
<body>
<div class="center-block ">
	<div class="panel panel-default">
		<!-- 导航 & 操作按钮 -->
		<div class="panel-heading" style="line-height: 35px;padding: 5px 15px;font-size: 16px;">
			<ol  style="display: inline;background-color: transparent;" class="breadcrumb" >
				<li><a href="${preUrl!'javascript:void(0)'}" id="backWard">资源发布</a></li>
				<li class="active">${ftl_operateCode[operateCode]}</li>
				<div style="display: inline; float: right;">
					<#if operateCode=='create'>
					<div class="btn-group">
					   <button type="button"  class="btn btn-default dropdown-toggle" 
					       data-toggle="dropdown"  title="新增一个表单" aria-haspopup="true" aria-expanded="false">
					    新增 <span class="caret"></span>
					  </button>
					  <ul class="dropdown-menu">
					    <li><a id="addSchemaResInfo" href="javascript:void(0)">新增表资源</a></li>
					    <li><a id="addServiceResInfo" href="javascript:void(0)">新增接口资源</a></li>
					  </ul>
					</div>
					</#if>
					<button type="button" id="btn-save" class="btn btn-default">保存</button>
                    <button type="button" id="btn-publish" class="btn btn-default">发布</button>
				</div>
			</ol>
		</div>
		<div style="padding:10px">
		<#if fullShow>
			<!-- Nav tabs -->
			<ul class="nav nav-tabs" role="tablist">
				<li role="presentation" class="active">
					<a href="#res-edit" aria-controls="res-edit" role="tab" data-toggle="tab">资源目录修改</a></li>
				<li role="presentation">
					<a href="#flow-detail" aria-controls="flow-detail" role="tab" data-toggle="tab">审核流程详情</a></li>
			</ul>
		</#if>	
			<div class="tab-content" >
				<div  ms-controller="resPublishVM" role="tabpanel" class="tab-pane active" id="res-edit" style="padding:30px;">
				    <form class="form-horizontal" role="form">
		                <div class="resPublish-property">
                       
                        </div>
						<div id="formContainer"  style="margin-top:50px;" >
						</div>
				    </form>
				</div>
				<#if fullShow>
				<div role="tabpanel" class="tab-pane" id="flow-detail"  style="padding:20px;">
					<div id="workFlow" class="flow" ></div>
					<table class="table table-striped">
						<tr>
							<th>办理环节</th><th>办理信息</th><th>时间</th><th>办理类型</th><th>办理意见</th>
						</tr>
						<#if taskList??>
						<#list taskList as t>
						<tr>
							<td>${t.TASK_NAME!}</td>
							<td>【办理人】${t.TRANSACTOR_NAME!}<br>【办理部门】${t.ORG_NAME!}</td>
							<td>${t.START_TIME} - ${t.END_TIME}</td>
							<td>${ftl_operateType[t.OPERATE_TYPE]}</td>
							<td>${t.REMARKS!}</td>
						</tr>
						</#list>
						</#if>
					</table>
				</div>
				</#if>
			</div>
		</div>
	</div>
</div>
<#include "mask.ftl"> 
<#include "tipDlg.ftl"> 
<@tipDlg content=""/>

<script type="text/javascript">
var str="${host}";
var resPublishOperate;
document.domain=str.substring(str.indexOf('.')+1,str.length);
$(function(){
	seajs.use(['resources/js/rescatalogMix/resPublishX/resPublish_operate.js'], function(ResPublishOperate){
		resPublishOperate=new ResPublishOperate({
			baseUrl:"${rc.getContextPath()}",
			userId:${userId!undefined},
			userName:'${user.account!undefined}',
			operateCode:'${operateCode}',
			org:{
				id:${org.id},
				name:'${org.name}',
				code:'${org.code}'
			},
		<#if RequestParameters["wfVersionId"]??>	wfVersionId:${RequestParameters["wfVersionId"]!0},</#if>
		<#if RequestParameters["instanceId"]??>	instanceId:${RequestParameters["instanceId"]!0},</#if>
		<#if RequestParameters["taskId"]??>	taskId:${RequestParameters["taskId"]!0},</#if>
		<#if curTaskNode??>curTaskNode:'${curTaskNode!}',</#if>
			resPublishId:${RequestParameters["resPublishId"]!0},
			listParam:{
				userId:${userId!undefined},
				qTitle:'${RequestParameters["qTitle"]!}',
				qStatus:'${RequestParameters["qStatus"]!}',
				pageSize:${RequestParameters["pageSize"]!10},
				pageNo:${RequestParameters["pageNo"]!1}
			}
		});
	});
});
</script>
</body>
</html>
